<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box"></div>
    <div class="box2"></div>
</body>
<style>
    .box{
        width: 100px;
        height: 100px;
        background: green;
        transition: all 2s linear;
    }
    .box:hover{
        width: 300px;
        height: 200px;
    }
    .box2{
        width: 100px;
        height: 100px;
        margin-left: 500px;
        margin-top: 400px;
        background: blueviolet;
        transition: all 2s linear;
        /* name duration timing-function delay iteration-count direction fill-mode; */
        animation:span 2s linear infinite;
    }
    /* .box2:hover{
        width: 300px;
        height: 200px;
    } */
    @keyframes span{
        0%{
            transform: rotate(0deg) translateY(0PX) scale(1);
        }
        50%{
            transform: rotate(180deg) translateY(200px) scale(1);
        }
        100%{
            transform: rotate(360deg) translateY(0PX) scale(1);
        }
    }
</style>
</html>